# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Notebooks.V1.Model.RuntimeSoftwareConfig do
  @moduledoc """
  Specifies the selection and configuration of software inside the runtime. The properties to set on runtime. Properties keys are specified in `key:value` format, for example: * `idle_shutdown: true` * `idle_shutdown_timeout: 180` * `enable_health_monitoring: true`

  ## Attributes

  *   `customGpuDriverPath` (*type:* `String.t`, *default:* `nil`) - Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.
  *   `disableTerminal` (*type:* `boolean()`, *default:* `nil`) - Bool indicating whether JupyterLab terminal will be available or not. Default: False
  *   `enableHealthMonitoring` (*type:* `boolean()`, *default:* `nil`) - Verifies core internal services are running. Default: True
  *   `idleShutdown` (*type:* `boolean()`, *default:* `nil`) - Runtime will automatically shutdown after idle_shutdown_time. Default: True
  *   `idleShutdownTimeout` (*type:* `integer()`, *default:* `nil`) - Time in minutes to wait before shutting down runtime. Default: 180 minutes
  *   `installGpuDriver` (*type:* `boolean()`, *default:* `nil`) - Install Nvidia Driver automatically. Default: True
  *   `kernels` (*type:* `list(GoogleApi.Notebooks.V1.Model.ContainerImage.t)`, *default:* `nil`) - Optional. Use a list of container images to use as Kernels in the notebook instance.
  *   `mixerDisabled` (*type:* `boolean()`, *default:* `nil`) - Bool indicating whether mixer client should be disabled. Default: False
  *   `notebookUpgradeSchedule` (*type:* `String.t`, *default:* `nil`) - Cron expression in UTC timezone, used to schedule instance auto upgrade. Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
  *   `postStartupScript` (*type:* `String.t`, *default:* `nil`) - Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (`gs://path-to-file/file-name`).
  *   `postStartupScriptBehavior` (*type:* `String.t`, *default:* `nil`) - Behavior for the post startup script.
  *   `upgradeable` (*type:* `boolean()`, *default:* `nil`) - Output only. Bool indicating whether an newer image is available in an image family.
  *   `version` (*type:* `String.t`, *default:* `nil`) - Output only. version of boot image such as M100, from release label of the image.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :customGpuDriverPath => String.t() | nil,
          :disableTerminal => boolean() | nil,
          :enableHealthMonitoring => boolean() | nil,
          :idleShutdown => boolean() | nil,
          :idleShutdownTimeout => integer() | nil,
          :installGpuDriver => boolean() | nil,
          :kernels => list(GoogleApi.Notebooks.V1.Model.ContainerImage.t()) | nil,
          :mixerDisabled => boolean() | nil,
          :notebookUpgradeSchedule => String.t() | nil,
          :postStartupScript => String.t() | nil,
          :postStartupScriptBehavior => String.t() | nil,
          :upgradeable => boolean() | nil,
          :version => String.t() | nil
        }

  field(:customGpuDriverPath)
  field(:disableTerminal)
  field(:enableHealthMonitoring)
  field(:idleShutdown)
  field(:idleShutdownTimeout)
  field(:installGpuDriver)
  field(:kernels, as: GoogleApi.Notebooks.V1.Model.ContainerImage, type: :list)
  field(:mixerDisabled)
  field(:notebookUpgradeSchedule)
  field(:postStartupScript)
  field(:postStartupScriptBehavior)
  field(:upgradeable)
  field(:version)
end

defimpl Poison.Decoder, for: GoogleApi.Notebooks.V1.Model.RuntimeSoftwareConfig do
  def decode(value, options) do
    GoogleApi.Notebooks.V1.Model.RuntimeSoftwareConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Notebooks.V1.Model.RuntimeSoftwareConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
